home *** CD-ROM | disk | FTP | other *** search
/ Mac Format 1994 October / Macformat17.cdr / Shareware City / Developers / GAL ƒ / GAL examples / input echo < prev    next >
Text File  |  1994-07-11  |  511b  |  24 lines

  1. ; echos input to the screen     
  2. looptop
  3.     jump:sub    input
  4.     compare:char    '.'=>reg0    ; stops when given a period
  5.     jump:equal    done
  6.     jump:sub    output
  7.     jump    looptop
  8. done
  9.     halt
  10. input                ; this is the non-handshaking input routine
  11.     copy:byte    instatus,Reg0
  12.     jump:equal input
  13.     copy:byte     indata=>reg0
  14.     return
  15.  
  16. output        ; this is the non-handshaking output routine
  17.     copy:long    reg0,savedata
  18.     copy:byte     outstatus=>reg0
  19.     jump:not_equal output
  20.     copy:long    savedata,Reg0
  21.     copy:byte     reg0,outdata
  22.     return
  23. savedata    variable:long 1
  24.     end